﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

/// <summary>
/// 网络数据包约定
/// </summary>

class NetPacket
{
    /// <summary>
    /// recivce
    /// </summary>
    // MsgStyle
    public static string PACTET_MSGSTYLE_NET_CONNECT = "gconnect";      //网络连接
    public static string PACTET_MSGSTYLE_CLOSE = "gclose";            //关闭
    public static string PACTET_ACTION_KEY_DOWN = "kd";             //按钮按下
    public static string PACTET_ACTION_KEY_UP = "ku";               //按钮按下
    public static string PACTET_ACTION_KEY_CLICK = "kc";            //按钮按下

    //data
    public static string PACTET_ACTION_SENSOR_YU = "yup";             //数据包解析到的动作类型传感器的上仰动作   按下上相关的按键
    public static string PACTET_ACTION_SENSOR_YMIDDLE = "ymiddle";    //数据包解析到的动作类型传感器的回复动作   弹起上下相关的按键
    public static string PACTET_ACTION_SENSOR_YD = "ydown";           //数据包解析到的动作类型传感器的下仰动作   按下下相关的按键
    public static string PACTET_ACTION_SENSOR_XLEFT = "xleft";        //数据包解析到的动作类型传感器的左倾动作   按下左相关的按键
    public static string PACTET_ACTION_SENSOR_XMIDDLE = "xmiddle";    //数据包解析到的动作类型传感器的回复动作   弹起左右相关的按键
    public static string PACTET_ACTION_SENSOR_XRIGHT = "xright";

    public static string PACTET_ACTION1 = "action1";           //数据包解析到的动作类型传感器的下仰动作   按下下相关的按键
    public static string PACTET_ACTION2 = "action2";        //数据包解析到的动作类型传感器的左倾动作   按下左相关的按键
    public static string PACTET_ACTION3 = "action3";    //数据包解析到的动作类型传感器的回复动作   弹起左右相关的按键
    public static string PACTET_ACTION4 = "action4";



    /// <summary>
    /// send
    /// </summary>
    // MsgStyle
    public static string PACTET_MSGSTYLE_SET_SENSOR = "gssensor";      //sensor灵敏度设置

    // Sensor   动作阀值
    public static int PACTET_SENSOR_VAULE_YUP = 2;                  //Y上仰
    public static int PACTET_SENSOR_VAULE_YDOWN = -2;               //Y下倾
    public static int PACTET_SENSOR_VAULE_XLEFT = -2;               //X左倾
    public static int PACTET_SENSOR_VAULE_XRIGHT = 2;               //X右倾

   
}
